<?php /* Smarty version 2.6.26, created on 2013-02-28 21:44:57
         compiled from mcost_dm_d_import.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'mcost_dm_d_import.html', 91, false),array('function', 'html_options', 'mcost_dm_d_import.html', 103, false),)), $this); ?>
<?php echo '<?xml'; ?>
 version="1.0" encoding="utf-8"<?php echo '?>'; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		
		<title>コントロールパネル</title>
		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/importing.css" type="text/css" />
		<link type="text/css" href="./assets/styles/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
		
		<script src="assets/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>
		<script type="text/javascript" src="./tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
		<script type="text/javascript" src="./assets/scripts/editor.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
				<script type="text/javascript" src="./assets/scripts/ui/ui.datepicker.js"></script>
		<script type="text/javascript" src="./assets/scripts/import.js"></script>
		<script type="text/javascript">
		$(function() {
			$('.text_date').datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat: 'yy/mm/dd'
			});
			
			$('#year4').change(function(){
				var year4 = this.value;
				var myDate = new Date();
				var nowtime =  myDate.getTime();
				$.get("mmap_week_ajax.php",{ y: year4,t : nowtime }, function(data){
					$("#week_cd").children().remove();
					$("#week_cd").append( data ); 
				});
			});
			
			$('#btn-import1').click(function(){
				if (document.fm.begin_date.value == ""){
					alert("セール開始日を入力してください");
					return false;
				}
				if (document.fm.end_date.value == ""){
					alert("セール終了日を入力してください");
					return false;
				}
				if ( chkWeek() ) {
					$('#layerzuo').fadeIn()
					//document.fm.action = "user_importing.php";
					document.fm.target = "i_frame";
					document.fm.submit();
				 }
			});
		});
		
		function chkWeek() {
			var weekid = $("#week_cd").val() ;
			if (weekid.length == 0){
				alert("週を選択してください");
				return false;
			 }
			return true;
		}
		</script>
	</head>
	<body id="">
<?php echo $this->_tpl_vars['menu']; ?>

<?php echo $this->_tpl_vars['logout']; ?>

		<div id="container"><div class="wrapper">
			<h2>DM経費マスター管理</h2>
			<ul class="submenu clearfix">
				<li><a href="mcost_dm_index.php">一覧.更新</a></li>
				<li>明細表登録</li>
				<li><a href="mcost_dm_c_import.php">件数表登録</a></li>
				<li><a href="mcost_dm_price.php">DM単価マスタ</a></li>
				<?php if (( $this->_tpl_vars['now_menu']['mcost_dm_plane_index']['auth'] )): ?><li><a href="mcost_dm_plane_index.php">経費一覧.更新</a></li><?php endif; ?>
				<?php if (( $this->_tpl_vars['now_menu']['mcost_dm_plane_import']['auth'] )): ?><li><a href="mcost_dm_plane_import.php">経費一括登録</a></li><?php endif; ?>
			</ul>
			<h3>明細表登録</h3>
			<p class="message">更新用CSVファイルの送信</p>
			<form  id="fmfile" name="fm" method="post"  action="mcost_dm_d_importing.php" enctype="multipart/form-data" >
				<table class="formTable">
					<tbody>
					<tr>
					<th>セール開始日</th>
					<td>
					<input type="text" name="begin_date"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['begin_date'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  class="text_date" />
					</td>
					</tr>
					<tr>
					<th>セール終了日</th>
					<td>
					<input type="text" name="end_date"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['end_date'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  class="text_date" />
					</td>
					</tr>
					<tr>
					<th>投函日※</th>
					<td>
					<?php echo smarty_function_html_options(array('id' => 'year4','name' => 'year4','options' => $this->_tpl_vars['year4'],'selected' => $this->_tpl_vars['forms']['year4']), $this);?>
 年<?php echo $this->_tpl_vars['err']['year4']; ?>

					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo smarty_function_html_options(array('id' => 'week_cd','name' => 'week_cd','options' => $this->_tpl_vars['week'],'selected' => $this->_tpl_vars['forms']['week_cd']), $this);?>
<?php echo $this->_tpl_vars['err']['week_cd']; ?>
 週
					</td>
					</tr><tr>
					<th>ファイル</th>
					<td>
						<input class="fileup" type="file" name="upfile" size="90" > <p class="error"><?php echo $this->_tpl_vars['err']['file']; ?>
</p> 
						<input type="hidden" name="isfilesubmit"  value = "1"/>
					</td>
						</tr>
					</tbody>
				</table>
				<p class="button">
					<button type="button" id="btn-import1" class="submit"><span>アップロード</span></button>
				</p>
			</form>
		</div>
		</div>
		<?php echo $this->_tpl_vars['import']; ?>

		<?php echo $this->_tpl_vars['footer']; ?>

	</body>
</html>